package com.yswee.mallnavi.entity;

import java.util.ArrayList;

import com.google.gson.annotations.SerializedName;

public class ArrayData<T> extends com.yswee.framework.data.BaseArrayData<T> {

	private static final long serialVersionUID = -6502069779001665313L;

	protected String cursor;
	protected int page;
	protected int count;
	protected int total;
	@SerializedName("data")
	public ArrayList<T> array;
	
	public ArrayData() {
		array = new ArrayList<T>();
	}
	
	@Override
	public ArrayList<T> getArray() {
		return array;
	}

	@Override
	public String getPageCuror() {
		return cursor;
	}

	@Override
	public int getPageIndex() {
		return page;
	}

	@Override
	public int getPageCount() {
		return count;
	}

	@Override
	public int getTotalCount() {
		return total;
	}

	@Override
	public boolean isLastPage() {
		return count > 0 && page >= count;
	}

}
